package com.keku.kplay.controller.app;

import com.keku.kplay.annotation.UserToken;
import com.keku.kplay.service.GameInfoService;
import com.keku.kplay.utils.IMoocJSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小良
 * @version 1.0
 * @date 2021/4/7 10:14
 */
@RestController
@RequestMapping("/app")
public class IndexController {

    @Autowired
    private GameInfoService gameInfoService;

    @GetMapping("/index")
    @UserToken
    public IMoocJSONResult index(){
        return IMoocJSONResult.ok(gameInfoService.getById(1));
    }

}
